package com.yuandian.management.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.management.entity.ConfProbeManage;
import com.yuandian.bpm.common.data.datascope.BpmBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 探针采集配置表-Mapper接口
 * @author zfsn
 * @date 2023-4-17
 */
@Mapper
public interface ConfProbeManageMapper extends BpmBaseMapper<ConfProbeManage> {

	/**
	 * 条件查询
	 *
	 * @param page
	 * @param reqDto
	 * @return
	 */
	Page<ConfProbeManage> selectByCondition(Page<ConfProbeManage> page, @Param("reqDto") ConfProbeManage reqDto);

	/**
	 * 通过id批量查
	 * @param idList
	 * @return
	 */
	List<ConfProbeManage> selectByIds(@Param("ids") List<Integer> idList);

	/**
	 * 批量更新探针状态
	 * @param ids
	 */
	void batchUpdateStatus(@Param("ids") List<Integer> ids, @Param("status") Integer status);

	/**
	 * 通过id查询
	 * @param id
	 * @return
	 */
	ConfProbeManage queryById(@Param("id") Integer id);

	/**
	 * 更新探针运行信息
	 * @param probeInfo
	 */
	void updateProbeRunInfo(@Param("info") ConfProbeManage probeInfo);

	/**
	 * 新增
	 * @param eo
	 */
	void save(@Param("info")ConfProbeManage eo);

	/**
	 *
	 * @param eo
	 */
	void updateInfo(@Param("info")ConfProbeManage eo);

	/**
	 *
	 * @param idList
	 */
	void deleteProbeByIds(@Param("list") List<Integer> idList);

	/**
	 *
	 * @param ip
	 * @param probeName
	 * @return
	 */
	ConfProbeManage selectByUniqueKey(@Param("ip") String ip,@Param("probeName") String probeName);
}